#/bin/sh

#编译
gcc Ex3_1.c -o Ex3_1 -lm -fopenmp -O3
mpicc Ex3_2.c -o Ex3_2 -lm -O3

for((i=1;i<=2;i++));
do
        echo $i                                         >> out1.txt;
        for((j=1; j<=12; j++));
        do
                export OMP_NUM_THREADS=$j;
                ./Ex3_1 $i                              >> out1.txt;
        done;
done

#for((i=1;i<=2;i++));
#do
#       for((j=12;j<=240;j++));
#       do
#               bsub -a intelmpi -q short -o ./out2.$i_$j -n $j mpirun.lsf ./Ex3_2 $i;
#       done;
#done;
